export default ngModule => {
    ngModule.directive('authCtr', ['$rootScope', function ($rootScope) {
        return {
            restrict: 'A',
            scope: {
                authCtr: '=',
            },
            link: function (scope, element, attr) {
                const urls = ['index', 'hello', 'fff'];
                element.hide();
                $rootScope.authPromise.then(() => {
                    console.log(attr);
                    if (!urls.includes(attr.authCtr)) {
                        console.log(false)
                        element.remove();
                    }else {
                        element.show();
                    }
                })
            }
        }
    }])
}